<template>
  <div class="editor-header">
    <div class="left">
      <Logo />
      <Title />
      <Name />
      <Save />
      <Back />
    </div>

    <div class="middle">
      <Nav />
    </div>

    <div class="right">
      <Version />
      <Preview />
      <Publish />
      <ExportPackage />
    </div>
  </div>
</template>

<script lang="ts" setup>
import Logo from './components/logo/index.vue';
import Back from './components/back/index.vue';
import Title from './components/title/index.vue';
import Nav from './components/nav/index.vue';
import Version from './components/version/index.vue';
import Publish from './components/publish/index.vue';
import Preview from './components/preview/index.vue';
import Save from './components/save/index.vue';
import ExportPackage from './components/export-package/index.vue';
</script>

<style lang="less" scoped>
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  background: #1d1e1f;
  border-bottom: 2px solid #000000;
  pointer-events: initial;

  .left {
    display: flex;
    align-items: center;
    width: 30%;
  }

  .right {
    display: flex;
    justify-content: flex-end;
    width: 30%;
    padding-right: 20px;
    :deep(.custom-button) {
      padding: 0 10px;
      font-size: 14px;
      color: #fff;
      background: #323232;
      border-radius: 4px;
      border-color: transparent;
      & [class*='el-icon'] + span {
        margin-left: 4px;
      }
      .el-icon {
        font-size: 24px;
        color: #545454;
      }
      &:hover,
      &:focus {
        border: 1px solid #0560fd;
        background: rgba(5, 96, 253, 0.3);
      }

      &.is-disabled {
        color: #545454;
        border-color: #323232;
        background: #323232;
      }
    }
  }
}
</style>
